package com.myjob.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Chen Yuan
 * @create 2021-02-09  17:21
 */
@Controller
@Slf4j
@RequestMapping("/oa/account")
public class AccountController {

	@GetMapping("/homepage")
	public String homePage(){
		return "/common/home";
	}
	@GetMapping("/public")
	public String publicPage(){
		return "/public";
	}

	@GetMapping("/baseInfoPage")
	public String baseInfoPage() {
		//request.getSession().setAttribute("userId", "300001");
		return "/common/account/baseInfo";
	}


	@GetMapping("/changePasswordPage")
	public String changePasswordPage() {
		return "/common/account/changePassword";
	}

	@GetMapping("/loginRegister")
	public String loginRegisterPage() {
		return "/common/account/loginRegister";
	}

	@GetMapping("/advertisementPage")
	public String advertisementPage(){
		return "/common/account/advertisement";
	}

	@GetMapping("/createAdvertisementPage")
	public String createAdvertisementPage(){
		return "/common/account/createAdvertisement";
	}

	@GetMapping("/newsPage")
	public String newsPage(){
		return "/common/account/news";
	}

	@GetMapping("/authorityManagement")
	public String authorityManagement(){
		return "/common/account/authorityManagement";
	}
}
